<template>
  <el-form :inline="true" model="query" size="small">
    <el-form-item>
      <el-input v-model="filters.name" placeholder="姓名"/>
    </el-form-item>
    <el-form-item>
      <el-button type="primary" @click="getTeachers">查询</el-button>
      <el-button type="primary" @click="handleAdd">新增教师</el-button>
    </el-form-item>
  </el-form>
</template>

<script>
export default {
  props: {
    query: {
      type: Object,
      required: true
    }
  },
  data() {
    return {}
  },
  methods: {
    toQuery() {
      this.$parent.page = 1
      this.$parent.init()
    }
  }
}
</script>
